.global _exit

_exit:
; pop what is pushed by the compiler at the beginning of the newprogram's main() function
; required because when exit() is called the code never reaches the endof the main() function
	pop ax; cancel the push si
	pop ax; cancel the push di
	pop ax; cancel the push bp; pop the ip from the call to exit()
	pop ax; cancel implicit push ip (call exit)
	retf
